import { useManager } from '../../composable/useManager'

const { managerOptions, getManagerInfo } = useManager()
export default {
  state: () => ({
    currentManager: { ...managerOptions },
  }),
  mutations: {
    setCurrentManager(state, data) {
      Object.assign(state.currentManager, data)
    },
  },
  actions: {
    async refreshManager({ commit }) {
      commit('setCurrentManager', await getManagerInfo())
    },
  },
}
